package com.example.program.InterCeptor;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//过滤器规则处理
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Autowired
    private interceptor log;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(log).addPathPatterns("/**").excludePathPatterns("/login");


    }
}
